package com.example.excel.config;

import org.springframework.jdbc.datasource.lookup.AbstractRoutingDataSource;
import org.springframework.lang.Nullable;

/**
 * 声明路由数据源key
 *
 * @author shigenfu
 */
public class MyRoutingDataSource extends AbstractRoutingDataSource {

    @Nullable
    @Override
    protected DBTypeEnum determineCurrentLookupKey() {
        return DataSourceContextHolder.get();
    }

}
